function numnew = upperLowerLimit(num, lower, upper)
numnew = zeros(length(num),1);
for i = 1:length(num)
	if num(i) > upper
		numnew(i) = upper;
        disp('> upper!');
    elseif num(i) < lower
		numnew(i) = lower;
        disp('< lower!');
    else
        numnew(i) = num(i);
    end
end
end